Skip to content

fix: stop _request() from double-removing its GLib timeout source on … - #5

Merged
ctrondlp merged 1 commit into
mainfrom
P2-fix-request-timeout-double-remove
Sep 10, 2026
Merged

ctrondlp merged 1 commit into
mainfrom
P2-fix-request-timeout-double-remove

Conversation

@ctrondlp

@ctrondlp ctrondlp commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

…timeout

Summary by CodeRabbit

  • Bug Fixes

    • Fixed portal request timeouts that could produce spurious GLib “source not found” warnings.
    • Portal calls that time out now complete cleanly without attempting to remove an already-removed timeout.
  • Tests

    • Added coverage to verify timeout cleanup behavior.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e295d321-05ab-4638-bf6c-3b9b6e134ce2

📥 Commits

Reviewing files that changed from the base of the PR and between 15282b2 and 058e4e3.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/libei/portal.py
  • tests/test_portal.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The portal request timeout cleanup now avoids removing an already deregistered GLib source. A regression test covers timed-out negotiation, and the changelog documents the fix.

Changes

Portal timeout cleanup

Layer / File(s) Summary
Timeout cleanup and regression validation
src/libei/portal.py, tests/test_portal.py, CHANGELOG.md
_request removes the timeout source only when a response wakes the loop. The regression test verifies that timeout handling does not call GLib.source_remove again. The changelog records the affected portal operations and test coverage.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 058e4

Portal requests no longer attempt to remove an already-deregistered timeout source, preventing the associated warning without changing successful request behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: preventing _request() from double-removing its GLib timeout source.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch P2-fix-request-timeout-double-remove

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ctrondlp
ctrondlp merged commit 745cdbb into main Sep 10, 2026
8 checks passed
@ctrondlp
ctrondlp deleted the P2-fix-request-timeout-double-remove branch September 12, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant